<template>
  <div>
    <el-button type="primary" class="fr" v-if="pressButtonControl.createItems" @click="createItems">创建</el-button>

    <div class="filter-container">
      <slot name="firstLine"></slot>
      <el-button class="filter-item" type="success" v-if="pressButtonControl.researchs" plain @click="researchs">查询
      </el-button>
      <el-button class="filter-item" type="info" v-if="pressButtonControl.exportData" plain @click="exportData"
        :loading="exportLoading">导出 </el-button>
      <el-button type="info" class="filter-item" v-if="pressButtonControl.more" plain @click="more">更多</el-button>
      <el-button class="filter-item" type="info" v-if="pressButtonControl.Reset" plain>重置 </el-button>

    </div>
    <slot v-if="searchShow" name="moreSearch"></slot>
  </div>
</template>

<script>
import commonMixin from '@/views/_common/mixin'
export default {
  name: '',
  mixins: [commonMixin],
  components: {},
  props: {
    // 按钮控制
    pressButtonControl: {
      type: Object,
      default: {
        researchs: true, //查询
        exportData: true, // 导出
        more: true, // 更多
        Reset: true, // 重置
        createItems: true, // 创建
      },
    },
  },
  data() {
    return {
      searchShow: false,
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    // 查询
    researchs() {
      this.$parent.query.queryString = this.query.queryString
      this.$emit('research')
    },
    // 创建
    createItems() {
      this.$emit('createItem')
    },
    // 更多
    more() {
      this.searchShow = !this.searchShow
    },
  },
}
</script>

<style lang="less" scoped></style>